package Botao;

import java.awt.Graphics2D;
import java.awt.event.MouseEvent;
import java.awt.image.BufferedImage;

import Utils.Utilidades;

public abstract class Botao {
	public int x;
	public int y;
	public int width;
	public int height;
	public BufferedImage imagemNormal;
	public BufferedImage imagemSelecionada;
	public boolean selecionada;
	public boolean mouseOver;
	
	

	public Botao(int X, int Y, int Width, int Height, String fileNomeNormal, String fileNomeOver) {
		this.x = X;
		this.y = Y;
		this.width = Width;
		this.height = Height;
		try {
			imagemNormal= Utilidades.LoadImage(fileNomeNormal);
			imagemSelecionada = Utilidades.LoadImage(fileNomeOver);
			
		} catch (Exception e) {
			// TODO: handle exception
		}
		selecionada = false;
		mouseOver = false;
	}
	
	public Botao(int X, int Y, String fileNomeNormal, String fileNomeOver) {
		this.x = X;
		this.y = Y;
		
		try {
			imagemNormal= Utilidades.LoadImage(fileNomeNormal);
			imagemSelecionada = Utilidades.LoadImage(fileNomeOver);
			
		} catch (Exception e) {
			// TODO: handle exception
		}
		this.width = imagemNormal.getWidth();
		this.height = imagemNormal.getHeight();
		selecionada = false;
		mouseOver = false;
	}
	public abstract void Draw(Graphics2D dbg);
	public abstract void Update(long diffTime);	
	public abstract void mouseMoved(MouseEvent e); 	
	public abstract void mouseDragged(MouseEvent e);	
	public abstract void mouseReleased(MouseEvent e);	
	public abstract void mousePressed(MouseEvent e);	
	public abstract void mouseExited(MouseEvent e);
	public abstract void mouseEntered(MouseEvent e);	
	public abstract void mouseClicked(MouseEvent e);

}
